#version 330 core
layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec2 uv;

uniform mat4 modelTrans;
uniform mat4 viewProjTrans;

out VsOut
{
	vec3 position;
	vec3 normal;
    vec2 uv;
} vsOut;

void main()
{
	vec4 aPos = vec4(position.x, position.y, position.z, 1.0);
	mat4 trans = viewProjTrans * modelTrans;
    gl_Position = trans * aPos;
	
	vec4 aNormal = vec4(normal.x, normal.y, normal.z, 0.0);
	vsOut.position = (modelTrans * aPos).xyz;
	vsOut.normal = (modelTrans * aNormal).xyz;
	vsOut.uv = uv;
}
